package com.casstime.ec.cloud.meeting.model;

import com.casstime.ec.cloud.meeting.dao.entity.EntityRoom;
import com.casstime.ec.cloud.meeting.values.MeetingRoomDTO;
import com.casstime.ec.cloud.stastic.transform.CommonTransform;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;

@Data
public class MeetingRoom {
    @ApiModelProperty(value="id")
    private Integer id;

    @ApiModelProperty(value="roomName")
    private String roomName;

    @ApiModelProperty(value="seat")
    private Integer seat;

    @ApiModelProperty(value="设备列表")
    private List<String> deviceNameList;


    @ApiModelProperty(value="status")
    private Integer status;

    public static MeetingRoom get(EntityRoom entityRoom) {
        MeetingRoom meetingRoom = new MeetingRoom();
        meetingRoom.setId(entityRoom.getId());

        meetingRoom.setRoomName(entityRoom.getRoomName());
        meetingRoom.setSeat(entityRoom.getSeat());
        meetingRoom.setStatus(entityRoom.getStatus());
        return meetingRoom;
//      return CommonTransform.transform(entityRoom,MeetingRoom.class);
    }




    public MeetingRoomDTO toDTO() {
        return CommonTransform.transform(this,MeetingRoomDTO.class);
    }


}
